<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class THistorywarn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_historywarn', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('hw_index')->nullable(false)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->integer('wd_index')->nullable(false)->default(0)->comment('');
			$table->datetime('rs_updatetime')->nullable(false)->comment('');
			$table->boolean('Rs_status')->nullable(false)->default(0)->comment('');
			$table->text('hw_descrition')->nullable()->comment('');
			$table->string('pdi_name', 64)->nullable(false)->default('')->comment('');
			$table->string('wd_warndesc', 100)->nullable(false)->default('')->comment('');
			$table->string('Wc_classname', 100)->nullable(false)->default('')->comment('');
			$table->string('dt_typememo', 64)->nullable(false)->default('')->comment('');
			$table->integer('Co_ID')->nullable(false)->comment('');
			$table->integer('pdi_code')->nullable(false)->comment('');
			$table->integer('Fid')->nullable(false)->comment('');
			$table->string('AreaName', 100)->nullable(false)->default('')->comment('');
			$table->unique('hw_index', 'hw_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_historywarn');
    }
}
